package com.springboot.rigger.modules.controller;

import com.springboot.rigger.modules.service.JifenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @title: JIfenController
 * @Author Star_Chen
 * @Date: 2023/10/17 11:14
 * @Version 1.0
 */
@RestController
public class JIfenController {

    @Autowired
    private JifenService jifenService;

    @GetMapping("insert")
    public void insert() {
        Long start = System.currentTimeMillis();
        for (int i = 0; i <= 1000000; ++i) {
            jifenService.insert();
        }
        Long end = System.currentTimeMillis();
        System.out.println("100w数据总共执行：" + (end - start)/1000 + "秒");
    }
}
